The present invention relates generally to the conversion of information or data in computing systems, and more particularly to the conversion of hierarchical information or data to a relational database model and the conversion of information or data in a relational database model to hierarchical information or data.
The efficient communication of information over computer networks is very important for individuals, corporations, and governments in a world in which networks play an ever increasing role in commerce, science, and world affairs. Efficient communication of information is promoted in networked multi-vendor environments by having a standard method of formatting the information.
Relational databases provide one method of formatting, manipulating, and exchanging information in a networked computing environment. Relational databases are widely used, have been in use for many years, and have many support tools. For example, query languages, such as the Structured Query Language (SQL), are in common use for retrieving information from a relational database. Unfortunately, there are many competing relational database systems in use and the data formatting is not uniform among these systems. This variation in data formatting makes database files unsatisfactory vehicles for exchanging information in a multi-vendor environment.
On the other hand, in applications requiring information exchange, hierarchical data formats, such as the extensible markup Language (XML), are becoming a standard. Using XML as a standard formatting language for exchanging information has several advantages. First, XML is a text based language, which allows the XML data to be exchanged across a multitude of computer systems that may be based on different binary data representations. Second, XML is a tag oriented language. Tags permit the creator of the data to express the semantics of the data and to capture the hierarchical relationships in the data in a way that is self-describing. Unfortunately, XML has not yet been extensively woven into relational database systems.
For these and other reasons there is a need for the present invention.
The above-mentioned shortcomings, disadvantages and problems are addressed by the present invention, which will be understood by reading and studying the following specification.
The present invention provides a method for transforming hierarchical data, such as XML data, into a rowset and a system and method for transforming a rowset into hierarchical data, such as XML data. The hierarchical data may exist in an active store or may be parsed from a stream format. In addition, data not initially included in an active store may be introduced into the active store. In transforming hierarchical data into a rowset, the hierarchical data stream is parsed into an internal format (such as for example the document object model (DOM)) that is processed to form rowsets. This internal representation may be used as an active store before the rowsets are generated or it may be only a temporary representation for the duration of the rowset generation. When processing the internal representation, a query processor receives and processes a query to form the rowset from that representation. The query may be formulated using the Structured Query Language (SQL) SELECT statement, and may include a row pattern for defining row information, one or more column patterns for defining column information, and a number of metaproperties, which are properties implied by the information in the data stream.
Data in a hierarchical format includes explicit information and implicit information. The explicit information is information that is obtained from viewing the file. The implicit information is implied by the structure and hierarchy of the file. This implicit information is used in transforming hierarchical data into a rowset. In transforming hierarchical data into a rowset, the implicit information can explicitly be identified and saved as explicit information in the rowset.
In transforming a rowset into hierarchical data, row information, column information, and a number of metaproperties are identified in the rowset. The row information, column information and the number of metaproperties are used in transforming the rowset into hierarchical data.
The invention includes systems, methods, computers, and computer-readable media of varying scope. Besides the embodiments, advantages and aspects of the invention described here, the invention also includes other embodiments, advantage and aspects, as will become apparent by reading and studying the drawings and the following description.